﻿using System.ComponentModel.DataAnnotations;

namespace JuCheap.Core.Model
{
    /// <summary>
    /// 产品修改模型
    /// </summary>
    public class CategoryEditRequestDto
    {
        /// <summary>
        /// Id
        /// </summary>
        [Display(Name = "Id")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Id { get; set; }

        /// <summary>
        /// 父级分类Id
        /// </summary>
        [Display(Name = "父级分类Id")]
        public string ParentId { get; set; }

        /// <summary>
        /// 产品分类名称
        /// </summary>
        [Display(Name = "产品分类名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(20, ErrorMessage = "{0}长度不能超过{1}个字符")]
        public string CategoryName { get; set; }

        /// <summary>
        /// 大图
        /// </summary>
        [Display(Name = "大图")]
        public string ImageUrlBig { get; set; }

        /// <summary>
        /// 小图
        /// </summary>
        [Display(Name = "小图")]
        public string ImageUrlSmall { get; set; }

        /// <summary>
        /// 首页显示
        /// </summary>
        [Display(Name = "首页显示")]
        public bool IsShowInHome { get; set; }

        /// <summary>
        /// 是否发布
        /// </summary>
        [Display(Name = "是否发布")]
        public bool IsPublish { get; set; }

        /// <summary>
        /// 排序序号
        /// </summary>
        [Display(Name = "排序序号")]
        public int Sort { get; set; }
    }
}
